package com.example.minibom.config;

/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
 */

import com.huawei.innovation.rdm.delegate.service.XdmTokenService;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;

/**
 * 配置请求头信息
 *
 * @since 2024-04-10
 */
@Configuration
public class FeignTokenConfig implements RequestInterceptor {
    @Autowired
    private XdmTokenService tokenService;

    @Override
    public void apply(RequestTemplate template) {
        template.header("Content-Type", MediaType.APPLICATION_JSON_VALUE);
        template.header("X-Auth-Token", "MIIN1gYJKoZIhvcNAQcCoIINxzCCDcMCAQExDTALBglghkgBZQMEAgEwggvoBgkqhkiG9w0BBwGgggvZBIIL1XsidG9rZW4iOnsiZXhwaXJlc19hdCI6IjIwMjUtMDYtMjRUMDY6MTM6NDUuMzczMDAwWiIsIm1ldGhvZHMiOlsicGFzc3dvcmQiXSwiY2F0YWxvZyI6W10sInJvbGVzIjpbeyJuYW1lIjoidGVfYWRtaW4iLCJpZCI6IjAifSx7Im5hbWUiOiJ0ZV9hZ2VuY3kiLCJpZCI6IjAifSx7Im5hbWUiOiJvcF9nYXRlZF9jc2JzX3JlcF9hY2NlbGVyYXRpb24iLCJpZCI6IjAifSx7Im5hbWUiOiJvcF9nYXRlZF9lY3NfZGlza0FjYyIsImlkIjoiMCJ9LHsibmFtZSI6Im9wX2dhdGVkX2Rzc19tb250aCIsImlkIjoiMCJ9LHsibmFtZSI6Im9wX2dhdGVkX29ic19kZWVwX2FyY2hpdmUiLCJpZCI6IjAifSx7Im5hbWUiOiJvcF9nYXRlZF9hX2NuLXNvdXRoLTRjIiwiaWQiOiIwIn0seyJuYW1lIjoib3BfZ2F0ZWRfZGVjX21vbnRoX3VzZXIiLCJpZCI6IjAifSx7Im5hbWUiOiJvcF9nYXRlZF9jYnJfc2VsbG91dCIsImlkIjoiMCJ9LHsibmFtZSI6Im9wX2dhdGVkX2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